package view.tip
{
	import data.Globals;
	
	import flash.display.Sprite;

	/**
	 *@author CrazyChen
	 *2013-6-9
	 *public class TankTip extends BaseTip
	 *
	 */
	public class TankTip extends BaseTip
	{
		public function TankTip()
		{
			super();
		}
		
		public function show(_x:int,_y:int,hp:int,shoutRadius:int,rotate:int,shoutRate:int):void{
			(Globals.gameView as Sprite).addChild(this);
			var html:String='';
			html+=	"<font color='#CFF1F2'>       血量： </font>"+hp+"\n";
			html+=	"<font color='#CFF1F2'>射击半径：</font>"+shoutRadius+"\n";
			html+=	"<font color='#CFF1F2'>转动速度：</font>"+rotate+"\n";
			html+=	"<font color='#CFF1F2'>射击频率：</font>"+shoutRate+"\n";
			txt.htmlText = html;
			sprite.width = txt.width;
			sprite.height = txt.height;
			this.x = _x;
			this.y = _y;
			if(this.x>Globals.stage_width){
				this.x = Globals.stage_width - this.width;
			}
			if(this.y>Globals.stage_height){
				this.y = Globals.stage_height - this.height;
			}
		}
	}
}